<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>Document</title>
  </head>
  <body>
    <script src="./1.js"></script>
    <script>
      // const startTime = new Date().getTime();
      // console.log("start time:", startTime);
      // function add(nums) {
      //   let total = 0;
      //   for (let key = 0; key < nums; key++) {
      //     total += key;
      //   }
      //   return total;
      // }

      // const num = add(10000000000);

      // console.log(num);
      // console.log("calc total time:", new Date().getTime() - startTime);

      Promise.resolve().then(() => {
        setTimeout(() => console.log("打印"), 0);
      });
    </script>
  </body>
</html>
